import { createRouter, createWebHistory } from 'vue-router';
import Login from '../components/Login.vue';
import Register from '../components/Register.vue';
import SalesForecast from '@/components/SalesForecast.vue';
import SalesPlan from '@/components/SalesPlan.vue';
import CashFlowStatement from '@/components/CashFlowStatement.vue';
import InCome from '@/components/InCome.vue';
import OutCome from '@/components/OutCome.vue';

const routes = [
  {
    path: '/',
    name: 'Login',
    component: Login
  },
  {
    path: '/register',
    name: 'Register',
    component: Register
  },
  {
    path: '/sales-forecast',
    name: 'SalesForecast',
    component: SalesForecast
  },
  {
    path: '/sales-plan',
    name: 'SalesPlan',
    component: SalesPlan
  },
  {
    path: '/cash-flow-statement',
    name: 'CashFlowStatement',
    component: CashFlowStatement
  },
  {
    path: '/Outcome',
    name: 'Outcome',
    component: OutCome
  },
  {
    path: '/Income',
    name: 'Income',
    component: InCome
  },
  {
    path: '/:pathMatch(.*)*',
    redirect: '/'
  }
];

const router = createRouter({
  history: createWebHistory(),
  routes
});

export default router;
